import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p001 from './p001';

export default async function a001(fd: IFeidaoAiBrowserComponent) {
	// todo
	//搜索
	const page_no = fd.data.params['page-no'] as string || '1';
	const n = fd.data.node.querySelector<HTMLInputElement>('[data-id="event_theme"]');
	const v = n.value;


	const n1 = fd.data.node.querySelector<HTMLSelectElement>('[data-id="safety_department_no"]');
	const v1 = n1.value;

	console.log('Xila', v1)


	const res = await nodejs('LiQiuLiang/zj-000003/s001', {


		event_theme: v,
		safety_department_no: v1,
		page_no: Number(page_no)


	});
	console.log(res);

	render(fd, res, p001, 'p001', 'inner');

}
